package com.lhy.common.web.java8time;

import com.lhy.common.web.util.LocalDateTimeUtil;
import org.springframework.core.convert.converter.Converter;

import java.time.LocalDate;

/**
 * 日期参数接收转换器，将字符串转为日期类型
 */
public class StringToLocalDateConverter implements Converter<String, LocalDate> {

    @Override
    public LocalDate convert(String s) {
        return LocalDateTimeUtil.parseDate(s);
    }
}
